---
title: "SQL-018: Get gaps"
summary: Retrieve policy gap rows for a policy.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-018 Get gaps

Retrieve policy gap rows for a policy.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-018 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsPolicyData` |
| **Criteria property** | `n/a (literal in `Gaps` property)` |
| **Lifecycle method** | `Gaps` property |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:aPolicyNum` | Input | Decimal | N/A | Policy number |
| `recordset` | Output (Cursor) | REF CURSOR | N/A | Gap rows |

## Tables

N/A — Stored procedure

## Sample SQL

```sql
-- Oracle stored procedure call (CommandType.StoredProcedure, ResultSet)
-- clsPolicyData.Gaps
CALL pk72846_view_policy.getgaps(
  :aPolicyNum,
  :recordset)
```


## Operations and processes
- [Lazy retrieval of policy detail and indicators](../operations-processes.md)

## Sources
- `SAIF.Business.View.Policy/clsPolicyData.vb`
